Add patch from upstream to make sure we use the built binaries for build-time testing
authorSimon McVittie <smcv@debian.org>
Sat, 16 Jul 2016 20:16:11 +0000 (21:16 +0100)
committerSimon McVittie <smcv@debian.org>
Sat, 16 Jul 2016 20:16:11 +0000 (21:16 +0100)
debian/changelog
debian/patches/Makefile-tests.am-make-check-uses-the-built-binaries.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]

index 32554fbb513fc1804270f552bfd41a7c8d5fd289..63eb955ed41a71bfc2329157876acd4a88788564 100644 (file)
@@ -2,6 +2,9 @@ ostree (2016.7-1) UNRELEASED; urgency=medium
 
   * New upstream version
     - drop all patches, applied upstream
+  * d/p/Makefile-tests.am-make-check-uses-the-built-binaries.patch:
+    add patch from upstream to make sure we use the built binaries for
+    build-time testing
 
  -- Simon McVittie <smcv@debian.org>  Sat, 16 Jul 2016 21:07:05 +0100
 
diff --git a/debian/patches/Makefile-tests.am-make-check-uses-the-built-binaries.patch b/debian/patches/Makefile-tests.am-make-check-uses-the-built-binaries.patch
new file mode 100644 (file)
index 0000000..e3fdf59
--- /dev/null
@@ -0,0 +1,57 @@
+From: Giuseppe Scrivano <gscrivan@redhat.com>
+Date: Thu, 14 Jul 2016 13:42:32 +0200
+Subject: Makefile-tests.am: make check uses the built binaries
+
+The tests suite was failing locally as it was using the installed
+version of rofiles-fuse, instead of the built one.  Create the needed
+symlinks in tests/ as we are already doing for the "ostree" binary.
+
+ostree-prepare-root and ostree-remount added for completeness.
+
+Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
+
+Bug: #395
+Reviewed-by: cgwalters
+Origin: upstream, commit:307f4b2957d0416604b1b0f9e74d72fd695c7137
+---
+ Makefile-tests.am | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile-tests.am b/Makefile-tests.am
+index e274c5e..0b6b64e 100644
+--- a/Makefile-tests.am
++++ b/Makefile-tests.am
+@@ -33,7 +33,8 @@ TESTS_ENVIRONMENT += OT_TESTS_DEBUG=1 \
+       PATH=$$(cd $(top_builddir)/tests && pwd):$${PATH} \
+       $(NULL)
+-uninstalled_test_data = tests/ostree-symlink-stamp
++uninstalled_test_data = tests/ostree-symlink-stamp tests/ostree-prepare-root-symlink-stamp \
++                      tests/ostree-remount-symlink-stamp tests/rofiles-fuse-symlink-stamp
+ dist_uninstalled_test_scripts = tests/test-symbols.sh
+@@ -238,12 +239,19 @@ EXTRA_DIST += \
+ tests/libreaddir-rand.so: Makefile
+       $(AM_V_GEN) ln -fns ../.libs/libreaddir-rand.so tests
+ ALL_LOCAL_RULES += tests/libreaddir-rand.so
+-CLEANFILES += tests/libreaddir-rand.so tests/ostree-symlink-stamp tests/ostree
++CLEANFILES += tests/libreaddir-rand.so tests/ostree-symlink-stamp \
++              tests/ostree-prepare-root-symlink-stamp tests/ostree-remount-symlink-stamp \
++              tests/rofiles-fuse-symlink-stamp tests/ostree
+-tests/ostree-symlink-stamp: Makefile
++tests/%-symlink-stamp: Makefile
+       @set -e; \
+-      real_bin=`cd $(top_builddir) && ./libtool --mode=execute echo ostree`; \
+-      ln -sf "$${real_bin}" tests/ostree; \
++      lt_bin=`cd $(top_builddir) && ./libtool --mode=execute echo $*`; \
++      if test "$${lt_bin}" = "$*"; then \
++              real_bin=$(abs_top_builddir)/$*; \
++      else \
++              real_bin="$${lt_bin}"; \
++      fi; \
++      ln -sf "$${real_bin}" tests/$*; \
+       touch $@
+ # Unfortunately the glib test data APIs don't actually handle
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..0642114
--- /dev/null
@@ -0,0 +1 @@
+Makefile-tests.am-make-check-uses-the-built-binaries.patch